package top.wshape1.shiziapi.uaa.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import top.wshape1.shiziapi.common.utils.R;

import java.io.InputStream;

/**
 * @author Wshape1
 * @version 1.0
 * @description
 * @since 2023-08-27
 */

@FeignClient("shiziapi-thirdparty")
public interface ThirdPartyFeignService {

    @GetMapping("/mail/send/{type}")
    R<Object> sendCodeMail(@PathVariable("type") String type, @RequestParam("to") String to, @RequestParam(required = false) Long id);

    @GetMapping("/avatar/gIfAb")
    R<Object> generateAvatarAndStoreIfAbsent(@RequestParam("id") Long id);

    @GetMapping("/avatar/uploadByUrl")
    R<Object> uploadAvatarByUrl(@RequestParam("id") Long id,
                                @RequestParam("url") String avatarUrl);

    @PostMapping("/avatar/uploadByBytes")
    R<Object> uploadAvatarByBytes(@RequestParam("id") Long id,
                                  @RequestParam("suffix") String suffix,
                                  @RequestBody byte[] bytes);

}
